package com.sina.medical.dao.user;

import com.sina.medical.dao.MedicalDataSourceDao;
import com.sina.medical.domain.user.User;
import org.springframework.stereotype.Repository;


/**
 * 用户到实现类
 */
@Repository("userDao")
public class UserDaoImpl extends MedicalDataSourceDao implements UserDao {

    @Override
    public User getUserByNameAndPsd(String name, String pwd) {
        return unique("from User where name = :name and pwd = :pwd",
                new String[]{"name", "pwd"},
                new Object[]{name, pwd});
    }
}
